#include "stdafx.h"
// CriticalSectionClass.h: interface for the CCriticalSectionClass class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(CRITICALSECTIONCLASS_H)
#define CRITICALSECTIONCLASS_H

#pragma once

//disable warnings on 255 char debug symbols
#pragma warning (disable : 4786)
//disable warnings on extern before template instantiation
#pragma warning (disable : 4231)

//##ModelId=4396837E0132
class CCriticalSectionClass  
{
public:
	//##ModelId=4396837E0142
	CCriticalSectionClass(){
		InitializeCriticalSection(&m_hAccessCS);
	}
	//##ModelId=4396837E0143
	virtual ~CCriticalSectionClass(){
		DeleteCriticalSection(&m_hAccessCS);
	}
public:
	//##ModelId=4396837E0145
	void				EnterCritical(){
		EnterCriticalSection(&m_hAccessCS);
	}
	//##ModelId=4396837E0146
	void				LeaveCritical(){
		LeaveCriticalSection(&m_hAccessCS);
	}
public:	
	//##ModelId=4396837E0147
	CRITICAL_SECTION	m_hAccessCS;
};

#endif // !defined(CRITICALSECTIONCLASS_H)
